package cn.rumoss.basic.finallyt;

/**
 * @ClassName FinallyTest1
 * @Description //TODO
 * @Author HeCG
 * @Date 19-5-19 下午1:57
 */
public class FinallyTest1 {

    public static void main(String[] args) {

        System.out.println(test1());
    }

    public static int test1() {
        int b = 20;

        try {
            System.out.println("try block");

            /*
            *try block
                finally block
                b>25, b = 100
                100
            */
            /*b += 80;
            return b;*/
            return b += 80;
        }
        catch (Exception e) {

            System.out.println("catch block");
        }
        finally {

            System.out.println("finally block");

            if (b > 25) {
                System.out.println("b>25, b = " + b);
            }
        }

        return b;
    }

}
